n,m = map(int, input().split())
matrix = []
for _ in range(n):
    row = list(map(int, input().split()))
    matrix.append(row)
x,y = map(int, input().split())
print(matrix[x-1][y-1])
